Part Number Hot Search : 
KIA7434P MAX9589 PLA43403 MPZ1005 SFBUX22 RB731U RE46C140 MV3450
Product Description
Full Text Search
 

To Download MAX78615LMUA01 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  max78615+lmu isolated energy measurement processor for load monitoring units for pricing, delivery, and ordering information, please contact maxim direct at 1 - 888- 629 - 4642, or visit maxim integrated?s website at www.maximintegrated.com. 19 - 6571 ; rev 0; 12/12 general description the max78615 +lmu is an isolated energy measurement processor (emp) for load monitoring and control of any 2 - wire single - phase or 3 - wire split - phase (120/180 ) ac circuit . it provides flexible sensor configuration of up to two max78700 ( four analog inputs ) and numerous host interface options for easy integration into any system architecture . the internal 24 - bit processor and field upgradeable firmware performs all the necessary signal processing, compensation , and data formatting for accurate real - time measurement . energy accumulation, alarm monitoring, and fault detection schemes minimize the overhead requirements of the hos t interface and/or network . the integrated f lash memory also provides for nonvolatile storage of input configurations and calibration coefficients. applications ? building automation systems ( commercial , industrial) ? inverters and renewable energy systems ? l evel 1 and 2 ev charging systems ? g rid - friendly appliances and smart plugs features ? utilizes max78700 isolated data converter (s) and resistive sensors ? flexible spi , i 2 c, or uart interface options with configu rable i/o p ins for alarm signaling, address pins , or user control ? nonvolatile s torage of c alibration and configuration parameters ? small 24 - tqfn p ackage and reduced b ill of m aterials ? internal o r external oscillator timing references ? quic k calibration routines minimize manufacturing (system) cost measurement processor ram flash uart spi i 2 c digital i / o pulse xfmr interface max 78615 + lmu host interface load relay ( s ) max 78700 max 78700
max78615+lmu data sheet rev 0 2 tab le of contents absolute maximum ratings ........................................................................................................................... 5 recommended external components ......................................................................................................... 5 recommended operating conditions ......................................................................................................... 5 performance specifications .......................................................................................................................... 6 pin configuration ................................................................................................................................................... 9 package information ........................................................................................................................................... 10 on - chip resources overview ............................................................................................................................... 11 block diagram ..................................................................................................................................................... 11 clock management ............................................................................................................................................. 12 power - on and reset circuitry ............................................................................................................................ 13 watchdog timer ................................................................................................................................................. 13 pulse transformer interface ............................................................................................................................... 14 24- b it energy measurement processor (emp) ................................................................................................... 14 flash and ram ......................................................................................................................................... 14 multipurpose dios .............................................................................................................................................. 14 communication interface ........................................................................................................................ 14 functional description and operation ................................................................................................................. 15 measurement interface ...................................................................................................................................... 15 afe input multiplexer .............................................................................................................................. 15 high pass filters and offset removal ....................................................................................................... 16 gain correction ........................................................................................................................................ 17 die temperature compensation .............................................................................................................. 17 phase compensation ............................................................................................................................... 18 voltage input configuration ..................................................................................................................... 19 current input configuration .................................................................................................................... 21 data refresh rates ............................................................................................................................................. 23 scaling registers ................................................................................................................................................. 23 calibration ro utines ........................................................................................................................................... 24 voltage and current gain calibration ...................................................................................................... 24 offset calibration ..................................................................................................................................... 24 die temperature calibration ................................................................................................................... 24 voltage channel measurements ........................................................................................................................ 25 quad rature voltage ................................................................................................................................. 25 voltage frequency ................................................................................................................................... 25 peak voltage ............................................................................................................................................ 25 rms voltage ............................................................................................................................................. 26 current channel measurements ........................................................................................................................ 26 peak current ............................................................................................................................................ 26 rms current ............................................................................................................................................. 27 crest factor .............................................................................................................................................. 27 power calculations ............................................................................................................................................. 28 active power (p) ....................................................................................................................................... 28 reactive power (q) .................................................................................................................................. 29 apparent power (s) .................................................................................................................................. 29 power factor (pf) ..................................................................................................................................... 29 fundamental and harmonic calculations ........................................................................................................... 30 energy calculations ............................................................................................................................................. 31 bucket size for energy counters .............................................................................................................. 31 min/max tracking ............................................................................................................................................... 33 alarm monitoring ............................................................................................................................................... 34
max78615+lmu data sheet rev 0 3 status registers .................................................................................................................................................. 36 digital io functionality ....................................................................................................................................... 37 dio polarity .............................................................................................................................................. 37 multipurpose (mp) pi ns ........................................................................................................................... 38 command register ............................................................................................................................................. 39 normal operation .................................................................................................................................... 39 calibration command .............................................................................................................................. 39 save to flash command ........................................................................................................................... 40 control re gister .................................................................................................................................................. 40 configuration register ........................................................................................................................................ 40 register access .................................................................................................................................................... 41 data types .......................................................................................................................................................... 41 register locations ............................................................................................................................................... 42 serial interfa ces ................................................................................................................................................... 47 uart interface .................................................................................................................................................... 47 rs- 485 support ........................................................................................................................................ 47 device address configuration .................................................................................................................. 48 ssi protocol description ........................................................................................................................... 49 spi interface ........................................................................................................................................................ 53 i 2 c interface ........................................................................................................................................................ 56 device address configuration .................................................................................................................. 57 bus characteristics ................................................................................................................................... 58 device addressing .................................................................................................................................... 58 write operations ..................................................................................................................................... 59 read operations ...................................................................................................................................... 60 ordering information ........................................................................................................................................... 61 contact information ............................................................................................................................................ 61 revision history ................................................................................................................................................... 62
max78615+lmu data sheet rev 0 4 table of figures figure 1. spi timing ......................................................................................................................................... 7 figure 2. i 2 c timing .......................................................................................................................................... 8 figure 3. tq fn package pinout ....................................................................................................................... 9 figure 4. block diagram ................................................................................................................................. 11 figure 5. crystal connections ........................................................................................................................ 12 figure 6. connecting the reset pin ........................................................................................................... 13 figure 7. defining source voltages ................................................................................................................ 19 figure 8. computing source voltage ............................................................................................................. 19 figure 9. voltage input flowchart ................................................................................................................. 20 figure 10. current input configuration ......................................................................................................... 21 figure 11. computing input current ............................................................................................................. 21 figure 12. current input flowchart ............................................................................................................... 22 figure 13. peak voltage measurement ......................................................................................................... 25 figure 14. rms voltage measurement ......................................................................................................... 26 figure 15. peak current measurement ......................................................................................................... 26 figure 16. rms current measurement ......................................................................................................... 27 figure 17. active power measurement ......................................................................................................... 28 figure 18. reactive power measurement ..................................................................................................... 29 figure 19. apparent power measurement .................................................................................................... 29 figure 20. min/max tracking ........................................................................................................................ 33 figure 21. measuring voltage sag ................................................................................................................. 35 figure 22. relay control ................................................................................................................................ 38 figure 23. configuring for rs - 485 ................................................................................................................. 47 figure 24. device address configuration ...................................................................................................... 48 figure 25. ssi protocol description ............................................................................................................... 49 figure 26. master packet structure ............................................................................................................... 49 figure 27. spi clock polarity and phase ......................................................................................................... 53 figure 28. spi transfer example .................................................................................................................... 55 figure 29. spi transaction example ............................................................................................................... 55 figure 30. connecting the i 2 c interface ......................................................................................................... 56 figure 31. i 2 c device address configuration ................................................................................................. 57 figure 32. i 2 c fundamental bus characteristics ............................................................................................ 58 figure 33. i 2 c device addressing ................................................................................................................... 58 figure 34. i 2 c write operation ...................................................................................................................... 59 fi gure 35. i 2 c multiple write operation ........................................................................................................ 59 figure 36. i 2 c read operation ....................................................................................................................... 60 figure 37. setting the register address pointer ............................................................................................ 60 figure 38. i 2 c multiple read operation ......................................................................................................... 60
max78615+lmu data sheet rev 0 5 absolute maximum ratings (all voltages with respect to ground.) voltage r ange v cc ................................ ................................ ................. - 0.5v to +4.6v operating junction temperature peak, 100ms ................................ ................................ ...... + 140c continuous ................................ ................................ ........ + 125c voltage r ange ch1n, ch1p, ch2n, ch2p, ch3n, ch3p .............. - 0.5v to ( v cc + 0.5v ) storage temperature range ................................ .. - 45c to +165c voltage range xin, xout ................................ ................................ ..... - 0.5v to +3.0v lead temperature (soldering, 10s) ................................ ...... + 2 6 0c soldering temperature (reflow) ................................ ........... + 300 c voltage range ifc0, ifc1, ssb/dir/scl, sdo/tx/sdao , sdi/rx/sda i , reset , spck/addr0 ................................ .................... - 0.5v to +3.0v esd stress, all pins ................................ ................................ .. 4kv voltage range, any digital pin configured as input ................................ ................................ ......... - 0.5v to +6.0v maximum current ch1n, ch1p, ch2n, ch2p, ch3n, ch3p ................... - 50ma to +50ma maximum current range xin, xout ................................ ................................ .. - 10ma to +10ma maximum current ifc0, ifc1, ssb/dir/scl, sdo/tx/sdao , sdi/rx/sda i , reset , spck/addr0 ................................ ............................. - 30ma to +30ma maximum current, any digital pin configured as input ................................ ................................ ...... 10ma to +10ma stresses beyond those listed under absolute maximum ratings may cause permanent damage to the device. these are stress rati ngs only, and functional operation of the device at these or any other conditions beyond those indicated in the operational section s of the specifications is not implied. exposure to absolute maximum rating conditions for extended periods may affect device reliability. recommended external components name from to function value unit s xtal xin xout 20.000mhz 20.000 mhz cxs xin gnd d load capacitor for crystal (exact value depends on crystal specifications and parasitic capaci - tance of board) 18 10% pf cxl xout gnd d 18 10% pf recommended operating conditions parameter condition s min typ max unit s 3.3v supply voltage (v 3p3 ) normal o peration 3.15 3.3 3.45 v operating temperature - 40 +85 c
max78615+lmu data sheet rev 0 6 performance specifications ( note that production tests are performed at room temperature. ) parameter condition s min typ max unit s input logic levels digital high - level input voltage ( v ih ) 2 v digital low - level input voltage ( v il ) 0.8 v output logic levels digital high - level output voltage ( v oh ) i load = 1ma v cc - 0.4 v i load = 10ma v cc - 0.6 digital low - level output voltage ( v ol ) i load = 1ma 0 0.4 v i load = 10ma 0.5 supply current v cc c urrent max78615+lmu only : v cc = 3.3v 5. 6 ma w ith one max78700 : v cc = 3.3v 7. 8 w ith two max78700 s: v cc = 3.3v 10.0 crystal oscillator xin to xout capacitance (note 1) 3 pf capacitance to gndd (note 1) xin 5 pf xout 5 internal rc oscillator nominal frequency 20.000 mhz accuracy at least one max78700 connected 1.50 % reset timing reset pulse fall time (note 1) 1 s reset pulse width (note 1) 5 s spi slave port spck cycle time ( t spicyc ) (note 1) 1 s enable lead time (t spil ead ) (note 1) 15 ns enable lag time ( t spil ag ) (note 1) 0 ns spck pulse width ( t spiw ) high (note 1) 250 ns low (note 1) 250 ssb to firs t spck f all ( t spisck ) ignore if spck is low when ssb falls (note 1) 2 ns disable t ime ( t spidis ) (note 1) 0 ns spck to data out (sdo) ( t spiev ) (note 1) 25 ns data input setup time (sdi) ( t spisu ) (note 1) 10 ns data input hold time (sdi) ( t spih ) (note 1) 5 ns
max78615+lmu data sheet rev 0 7 parameter condition s min typ max unit s i 2 c slave port bus idle (free) t ime b etween t ransmissions ( stop/start ) ( t buf ) (note 1) 1500 ns i 2 c i nput fall time ( t icf ) (note s 1, 2) 20 300 ns i 2 c i nput rise time ( t icr ) (note s 1, 2) 20 300 ns i 2 c s tart or r epeate d start condition hold time ( t sth ) (note 1) 500 ns i 2 c s tart or r epeate d s tart condition setup time ( t sts ) (note 1) 600 ns i 2 c clock high time ( t sch ) (note 1) 600 ns i 2 c clock low time ( t scl ) (note 1) 1300 ns i 2 c serial data setup time ( t sds ) (note 1) 100 ns i 2 c serial data hold time ( t sdh ) (note 1) 10 ns i 2 c valid data time ( t vda ) : scl lo w to sda output v alid ack s ignal from scl l ow to sda ( out) low (note 1) 900 ns note 1: guaranteed by design, not subject to test. note 2: dependent on bus capacitance. msb out lsb out msb in lsb in t spicyc t spilead t spilag t spisck t spih t spiw t spiev t spiw t spidis ssb spck sdi sdo t spisu figure 1 . spi timing
max78615+lmu data sheet rev 0 8 t buf stop start t sth t sch t scl scl t icr t icf t icr t icf sda t sds t sdh t vda t sps t sts stop condition repeat start condition figure 2 . i 2 c timing
max78615+lmu data sheet rev 0 9 pin configuration v cc ifc0 gnd mp7 mp6/addr1 spck /addr0 mp0/ifc1 ssb/dir/scl ssb/dir/scl 6 5 4 3 2 1 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 sdo/tx/sdao comp1 v cc xout gnd xin ch3p ch3n ch1p ch1n ch2p ch2n sdi/rx/sdai max78615+lmu (top) reset comp2 figure 3 . t qfn package pinout pin signal function pin signal function 1 gnd ground 13 sdo/tx/ sda o spi data out/uart t x / i 2 c data out 2 ifc0 ifc1/spi (1 = ifc1; 0 = spi) 14 sdi/rx/ sda i spi data in/uart r x / i 2 c data in 3 mp7 multipurpose dio 15 spck/ addr0 spi clock / address pin 4 mp6 /addr1 multipurpose dio / address pin 16 mp0/ifc1 i 2 c/uart (1 = i 2 c; 0 = uart) 5 ssb/dir/scl slave select (spi) / rs- 485 tx - r x / i 2 c serial clock 17 reset active - low reset input 6 mp4 multi p urpose dio 18 v cc 3.3v dc supply 7 v cc 3.3v dc supply 19 ch2n channel 2 input 8 xin crystal oscillator driver input 20 ch2p channel 2 input 9 xout crystal oscillator driver output 21 ch1n channel 1 input 10 gnd g round 22 ch1p channel 1 input 11 comp2 reserved ; n o connection 23 ch3n reserved; no connection 12 comp1 reserved ; n o connection 24 ch3p reserved; no connection
max78615+lmu data sheet rev 0 10 package information for the latest package outline information and land patterns (footprints), go to www.maximintegrated.com/packages . note that a +, #, or - in the package code indicates rohs status only. package drawings may show a different suffix character, but the drawing pertains to the package regardless of rohs status. package type package code outline no. land pattern no. 24 t qfn t2444+4 21 - 0139 90 - 0022
max78615+lmu data sheet rev 0 11 on - chip resources overview the max78615 +lmu device , when connected with an isolated max78700, integrates all the hardware blocks required for accurate ac power and energy measurement. included in the max78615 are: ? o scillator circui ts and clock management logic ? power - on reset, watchdog t imer, and reset circuitry ? 24- bit energy measurement processor (emp) with ram and flash memory ? serial uart, spi, i 2 c interfaces and m ultipurpose d igital i/o ? pulse transformer interface (for connection to one or more max78700) block diagram the following is a block diagram of the hardware resources available on the max78615 +lmu. ch3n ch3p xin xout v cc gnd io mux info. block flash 4kx16 program memory uart ram 512 x24 i 2 c reset spi ch2n ch2p pulse transformer interfaces pulse transformer control v cc gnd 2.5v reg xtal osc clk sel clk gen emp timers watchdog rc osc ch1n ch1p ifc 0 mp0 / ifc 1 spck / adrr0 sdi / rx / sdai sdo / tx / sdao mp4 ssb / dir / scl mp6 / addr1 mp7 comp1 comp2 figure 4 . block diagram
max78615+lmu data sheet rev 0 12 clock management the device can be clocked by either a trimmed internal rc oscillator or by oscillator circuitry that relies on an external crystal. the internal rc oscillator provides an accurate clock source for uart baud rate generation. only time based calculations such as line frequency and watt - hour (en ergy) are affe cted by clock accuracy . the chip hardware automatically handles the clock sources logic and distributes the clock to the rest of the device. upon reset or power - on, the device will utilize the internal rc oscillator circuit for the first 10 24 clock cycles, allowing the external crystal adequate time to start - up. the device will then automatically select the external clock , if available . it will also automatically switch back to the internal oscillator in the event of a failure with the exter nal oscillator. this condition is also monitored by the processor and available to the user in the status register. the max78615 +lmu external cl ock circuitry requires a 20.000 mhz crystal. the circuitry includes two 18pf ceramic capacitors. the figure bel ow shows the typical connection of the external crystal. this oscillator is self biasing and therefore an external resistor should not be connected across the crystal. xin xout 18 pf 18 pf 20 . 000 mhz max 78615 + lmu figure 5 . crystal connections a n external 20mhz system clock signal can also be utilized instead of the crystal. in this case , the external clock should be connected to the xout pin while the xin pin should be connected to gndd. alternatively, if no external crystal or clock is utiliz ed, the xout pin should be connected to gndd and the xin pin left unconnected.
max78615+lmu data sheet rev 0 13 power - on and reset circuitry an on - chip power - on reset (por) block monitors the supply voltage (v 3p3d ) and initializes the internal digital circuitry at power - on. once v 3p3d is above the minimum operating threshold, the por circuit triggers and initiates a reset sequence. it will also issue a reset to the digital circuitry if the supply voltage falls below the minimum operating level. in addition to the internal sources, a r eset can be forced by applying a low level to the reset pin . if the reset pin is pulled low, all digital activities in the device stop, except the clock management circuitry and oscillators, which continue to run. the external reset input is filtered to pr event spurious reset events in noisy environments. the reset does not occur until reset has been h eld low for at least 1 s. once initiated, the reset mode persists until the reset is set high and the reset timer times out (4096 clock cycles). at the comp letion of the reset sequence, the internal reset is released and the processor (emp) begins executing from address 0. if not used, the reset pin can be connected either directly or through a pullup resistor to v 3p3d supply. a simple connection diagram is shown below . gnd v cc reset 1nf 10k 3.3vdc gnd manual reset switch gnd v cc reset 3.3vdc gnd max78615 +lmu max78615 +lmu a) external reset connection example b) unused reset connection example figure 6 . connecting the reset pin watchdog timer a watchdog timer (wdt) block detects any software processing errors. t he software periodically refreshes the free - running watchdog timer to prevent it from timing out. if the wdt times out, it is an indication that software is no longer being executed in the intended sequence; thus, a system reset is initiated.
max78615+lmu data sheet rev 0 14 pulse transf ormer interface up to three isolation interfaces (channels) are provided to control, configure, and read measurement data from a max78700. power pulses are spaced at 10.00mhz/6 (600ns period) with write and read pulses located in between. within every powe r pulse cycle a write data pulse and a read data pulse is inserted. power and write pulses come from the max78615+lmu, read pulses come from the max78700. 24- bit energy measurement processor (emp) the max78615 +lmu integrates a dedicated 24 - bit signal processor that performs the entire digital signal processing necessary for energy measure ment, alarm generation, calibration , compensation, etc. for the following section provides a description of functionality and operations. flash and ram the max78615 +l mu includes 8kb of on - chip flash memory. the flash memory primarily contains program code, but also stores calibration data and defaults for select nonvolatile configuration registers . the device also includes 1.5kb of on - chip ram which contains the values of input and output registers and is utilized by the processor for its operations. multi p urpose dios there are a total of nine digital input/outputs (dios) on the max78615 +lmu device . some are dedicated to serial interface communications and configuration . others are multipurpose i/o that can be used as a s imple output under user control or routed to special purpose internal signals like alarm signaling and relay control. communication interface the max78615 +lmu includes three communication i nterfaces: uart, spi, and i 2 c . since the i/o pins are shared, only one mode is supported at a time. interface configuration and address pins are sampled at power - on or reset to determine which interface will be active and to set device addresses.
max78615+lmu data sheet rev 0 15 functional description and operation this section describes the operation and configuration of the max78615 +lmu . it includes the flow of measurement data, relevant calculations, alarm monitoring, i/o control, and user configuration s . measurement interface the max78615 +lmu incorporates an isolated measurement interface for simplified integration into any single - phase system . this section describes the configuration and signal cond itioning of the raw data received from the max78700 . s ett ings and calibration parameters described in this section can be saved to flash memory and automatically initialized upon power on or reset . afe input multiplexer the max78615 +lmu processes data from up to four ( 4 ) external sensors with an effective sample rate of 4ksps for each multiplexer slot . two sensor input s a0 and a1 are implemented on each max78700 . sensor slot analog input input type s0 channel 1 - a0 voltage s1 channel 1 - a1 current s2 channel 2 - a0 voltage s3 channel 2 - a1 current
max78615+lmu data sheet rev 0 16 high pass filters and offset removal offset registers for each analog input contain values to be subtracted from the raw adc outputs for the purpose of removing inherent system dc offsets from any calculated power and rms values . these registers are signed fixed point numbers w ith a possible range of - 1.0 to 1 - lsb . they default to 0 and can be manually changed by the user or integrated offset calibration routines. register description s1_off s current input s 1 offset calibration s0_off s voltage input s0 offset calibration s3_off s current input s3 offset calibration s2_off s voltage input s2 offset calibration alternatively, the user can enable an integrated high pass filter (hpf) to dynamically update the offset registers every accumulation interval. during each accumulat ion interval (or low - rate cycle) the hpf calculates the median or dc average of each input . adjustable coefficients determine what portion of the measured offset is combined with the previous offset value. hpf_coef_x registers contain signed fixed point n umbers with a usable ran ge of 0 to 1 - lsb (0.99999), negative values are not supported . by default, they are initialized to 0.5 (0x400000) meaning the new offset value will come from one - half the measured offset and one - half will come from the previous offset value. setting them to 1.0 (0x7fffff) causes the entire measured offset to be applied to the offset register enabling lump - sum offset removal. setting them to zero disables any dynamic update of the offset registers by th e hpf. register description hpf_coef_i hpf coefficient for s1 and s3 current inputs hpf_coef_v hpf coefficient for s0 and s2 voltage inputs to allow the dc component of the load current to be includ ed in the measurement (i.e. half - wave rectified current waveforms), the hpf _coef_i coefficients must be set to zero. using the offset calibration routine will automatically set the filter coefficients to zero to disable the hpf.
max78615+lmu data sheet rev 0 17 gain correction the system (sensors) and the max78615 +lmu device inherently have gain errors that can be corrected by using the gain registers . these registers can be directly accessed and modified by an external processor or automatically updated by an integr ated self calibration routine. input gain register s are signed fixed point numbers with the bina ry point to the left of bit 21. they are set to 1.0 by default and have a usable range of 0 t o 4 - lsb, negative values are not supported . the gain equation for each input slot can be described as sx = sx * sx_ gain register description s0_gain voltage input s0 gain calibration. s1 _gain current input s1 gain calibration s2_gain voltage input s2 gain calibration. s3_gain current input s3 gain calibration die temperature compensation the max78615 +lmu receives the isolated adc (max78 7 00) die temperature measurements. this data can be used by the signal processor for correcting the voltage reference error (band gap curvature) and made available to the user in the temp c register. setting the temperature compensation (tc) bit in the c ommand r egister allows the firmware to further adjust the system gain based on measured isolated die temperature. the isolated adc die temperature offset is typically calibrated by the user during the calibration s tage . die temperature gain is set to a factory default value for most applications , but can be adjusted by the user. register description t_offs die temperature offset calibration. t_gain die temperature slope calibration. set by factory . voltage reference gain adjustment the isolated adc on - chip precision bandgap voltage reference incorporates auto - zero techniques as well as production trims to minimize errors caused by component mismatch and drift . it can be assumed that the part is trimmed at 22c to produce a uniform voltage reference gain at that temperature . the voltage reference is digitally compensated over changes in measured die temperature using a quadratic equation .
max78615+lmu data sheet rev 0 18 phase compensation phase compensa tion registers are used to compensate for phase errors or time delays between the voltage input source and respective current source that are introduced by the off - chip sensor circuit . the user configurable registers are signed fixed point numbers with the binary point to the left of bit 21 . values are in units of high rate (4 kh z) sample delays so each integer unit of delay is 250 s with a total possible delay of 4 samples (roughly 20 at 60hz). register description phasecomp1 phase (delay) compensation for s1 input current phasecomp3 phase (delay) compensation for s3 input current example: to compensate a phase error of 277.77s (or 6 at 60hz) introduced by a current transformer (ct) it is necessary to enter the following: ? ? ??? ???????????? = ? ? ??? ????? 1 ?????? ???? ? ? ??? ???????????? = 277 ? ? 6 1 4000 = 1. 111 the value to be entered in the phase compensation register is therefore: ????? = 1. 111 ? 2 21 = 2330169 = 0x 238 e 39
max78615+lmu data sheet rev 0 19 voltag e input configuration the max78615 +lmu supports multiple analog input configurations for determining the three potential voltage sources in a split - phase circuit . the device measure s the voltage difference between any two references and use s this information to derive the v oltages va, vb, and vc as shown below. conductor a conductor n conductor b va vb vc + + + - - - figure 7 . defining source v oltages each calculated voltage source (va , vb, and vc ) is derived from the following user configurable function of the voltage input multiplexer slots (s0, s2) and three pairs of multiplier values (m0, m2) . this function derives source voltages va, vb, and vc by summing s0 x m0 and s2 x m2. m0 + m2 vx s0 s2 figure 8 . computing source voltage the user sets the multiplier values m0 and m2 for each voltage source in the config register using the model where a one (1) value adds the input, a two (2) value adds two of the input, a minus one ( - 1) value subt ract the input, a zero (0) value does not i nclude the input. config bits 19:18 17:16 15:14 13:12 11: 10 9: 8 multiplier m2 m0 m2 m0 m2 m0 source vc vb va there are four choices for every m value as shown below. multiplier bits 00 01 10 11 m (multiplier) value - 1 0 1 2 the output registers va, vb and vc are automatically scaled by a factor of 0.5 if m0 and m2 are both nonzero. for example, by setting the multiplier bits as follows: ?? = + 1 ? ? 0 ? 1 ? ? 2 the effective content of the vc register would result in: ?? = ( + 1 ? ? 0 ) + ( ?1 ? ? 2) 2 this scaling is done to prevent the output register from overflowing.
max78615+lmu data sheet rev 0 20 voltage input flowchart the figure below illustrates the computation al flowchart for va , vb, and vc . the values for voltage input configuration register can be saved in flash memory and automatically restored at power - on or reset. x gain _ ajust delay compensation 2 , 1 , - 1 , 0 config x delay compensation 2 , 1 , - 1 , 0 + va s 0 s 2 x 2 , 1 , - 1 , 0 config x 2 , 1 , - 1 , 0 + vb x x 2 , 1 , - 1 , 0 config x 2 , 1 , - 1 , 0 + vc x s 0 _ gain hpf _ coef _ v x s 2 _ gain x s 0 _ offs s 2 _ offs hpf hpf figure 9 . voltage input flowchart
max78615+lmu data sheet rev 0 21 current input configuration the max78615 +lmu support s multiple analog input configurations for determining the two load currents in a split - phase ac circuit . the device measures the current of any two conductors and uses this information to derive the load currents shown below. conductor a conductor n conductor b i b ia = - i b - i n ib = - i a - i n i n i a figure 10. current input configuration each calculated load current (ia and ib) is derived from the following function of the current input slots (s1 and s3) and 2 pairs of multiplier values (m1 and m3) . this function derives source currents ia and ib by summing s1 x m1 and s3 x m3. m 1 + m3 ix s1 s3 figure 11. computing input current the user sets the multiplier values for each current source in the config register usi ng the model where a one (1) value adds the input, a two (2) value adds two of the input, a minus one ( - 1) value subtract the input, a zero (0) val ue does not include the input. config bits 7: 6 5: 4 3: 2 1: 0 multiplier m3 m1 m3 m1 source ib ia there are four choices for every m value as shown below. bit v alues 00 01 10 11 m (multiplier) value - 1 0 1 2 the output registers ia and ib are automatically scaled by a factor of 0.5 if m1 and m3 are both nonzero. for example, by setting the multiplier bits as follows: ?? = +1 ? ? 1 ? 1 ? ? 3 the effective content of the vc register would result in: ?? = ( + 1 ? ? 1 ) + ( ?1 ? ? 3) 2 this scaling is done to prevent the output register from overflowing.
max78615+lmu data sheet rev 0 22 current input flowchart the figure below illustrates the computational flowchart for i a and ib . the values for current input configuration register can be saved in flash memory and automatically restored at power - on or reset. x 2 , 1 , - 1 , 0 config x 2 , 1 , - 1 , 0 + ia s 1 _ gain delay compensation x 2 , 1 , - 1 , 0 config x 2 , 1 , - 1 , 0 + ib hpf hpf hpf _ coef _ i config x 1 x s 1 s 3 _ gain delay compensation config x 1 x s 3 gain _ adj x x s 1 _ off s 3 _ off figure 12. current input flowchart
max78615+lmu data sheet rev 0 23 data refresh rate s instantaneous voltage, current, power , and quadrature measurement results are updated at the sample rate of 4k s/s and are generally not useful unless accessed with a high speed interface such as spi . the cycle register is a 24- bit counter that increment s every high - rate sample update and reset s when low - rate results are updated. low - rate results, updated at a user configurable rate, are typically used and more suitable for most applications . the frame register is a counter that increments every accumulation interval . a data ready indicator in the status regi ster indicates when new data is available . the high - rate sample s are averaged to produce one low - rate result (known as an accumulation interval), increasing their accuracy and repeatability. low - rate results include rms voltages and currents, frequency, p ower , energy, and power factor . the accumulation interval can be based on a fixed number of adc samples or locked to the incoming line voltage cycles. if line lock is disabled, the accumulation interval defaults to a fixed time interval defined by the num ber of samples defined in the samples register (default o f 400 samples or 0.1 seconds). when the line - lock bit in the c ommand r egister is set, and a valid ac voltage signal is present, the actual accumulation interval is stretched to the next positive zer o crossing of the reference line voltage after the defined number of samples has been reached . if there is not a valid ac signal present and line lock is enabled, there is a 100 sample timeout implemented that would limit the accumulation interval to sampl es+100. the divisor register records the actual duration (number of high - rate samples) of the last low - rate interval whether or not line - lock is enabled. two bits in the config register allow the user to select the reference voltage slot for deriving zero - crossing detection and line frequency. config[23:22] 00 01 10 11 voltage reference s0 s2 s0 - s2 s0+s2 scaling registers most measurement data is reported in binary full - scale units with a value range of - 1.0 to 1 - lsb . all full scale register readings correspond to the max analog input of 250mvpk (or 31.25mvpk with 8x gain) . as an example, if 230v - peak at the input to the voltage divider gives 250mv - peak at the chip input, one would get a ful l scale register reading of 1 - lsb (0x 7fffff) for in stantaneous voltage. similarly , if 30apk at the sensor input provides 250mv - peak to the chip input, a full scale register value of 1 - lsb (0x7fffff) for instantaneous current would correspond to 30 amps . full scale watts correspond to the result of full scale current and voltage so , in this example, full scale watts is 230 x 30 or 6900 watts. n onvolatile registers (ifscale and vfscale) are provided for storing the real - world current and voltage levels that apply to the full scale r egister readings for any given board design . any host application can then format the measurement results to any data format as needed . the usage of these nonvolatile scratchpad registers is user defined and their content has no effect on the internal oper ations of the device. frequency data has a range of 0 to +32768hz less one lsb (format s15.8). temperature data has a fixed scaling with a range of - 65536c to +65536c less one lsb (format s16.7). energy data scaling is described in detail in the energy measurements section .
max78615+lmu data sheet rev 0 24 calibration routines the max78615 +lmu includes optional integrated calibration routines to modify gain and offset coefficients . the user can set up and initiate on - chip calibration routine s through the c ommand r egister . when in calibration mode , results are averaged over multiple accumulation intervals defined in the calcycs register. the calibration routines will write the new coefficients to the relevant input registers . the user can then save the new coefficients into fla sh memory as defaults using the flash access command (acc) in the c ommand r egister . see the command register section for more information on using calibration and flash access commands. voltage and current gain calibrati on in order to calibrate the gain parameters for voltage and current channels, a reference ac signal must be applied to the channel to be calibrated. the rms value corresponding to the applied reference signal must be entered in the relevant target register ( vtarget , itarget ). considering calibration is done with low - rate rms results , the value of the target register should never be set to a value above 70.7% of full - scale . initially, the value of the gain is set to unity for the selected channels. rms values are then calculated on selected inputs and averaged over the number of measurement cycles set by the calcycs register . the new gain is calculated by dividing the appropr iate target register value by the averaged measured value. the new gain is then written to the select gain registers unless an error occurred. on a successful calibration, the command bits are cleared in the c ommand r egister, leaving only the system setup bits. in case of a failed calibration, the bit in the c ommand r egister corresponding to the failed calibration is left set. offset calibration to calibrate offset s , all signals should be removed from all analog inputs ( although it is possible to do the c alibration in the presence of ac signals ) . in the command, the user also specifies which channel(s) to calibrate. target registers are not used for offset calibration. during the calibration process, each input is accumulated over the entire calibration i nterval as specified by the calcycs register. the result is divided by the total number of samples and written to the appropriate offset register if selected in the calibration command. using the offset calibration command will set the respective hpf coeff icients to zero thereby fixing the sx_offs offset registers to their calibrated values. upon completion of calibration, only the 0xcaxxxx bits of the command register are cleared. die temperature calibration to re - calibrate the temperature sensor offset s of the max78700 devices , the user must first write the known chip temperature to the t_target register . next, the user initiates the temperature calibration command in the c ommand r egister . this will update the respective t_offs x offset parameter s with a new offset based on the known temperature supplied by the user . the t_gain gain register is set by the factory and not updated with this routine. the range of the die temperature registers is - 128 to +128 - lsb degrees celsius.
max78615+lmu data sheet rev 0 25 voltage channel me asurements i nstantaneous and quadrature voltage measurements are updated every sample while rms voltage and peak voltage are updated every accumulation interval ( n samples) . an ac voltage frequency measurement is also updated every low - rate interval. register description time s cale va vb vc instantaneous voltage @ time t 1 sample vqa vqb quadrature voltage @ time t - 90 freq ac voltage frequency 1 interval va_peak vb_peak peak voltage in last interval va_rms vb_rms vc_rms rms voltage of last interval quadrature voltage the quadrature voltage is instantaneous voltage that is phase shifted (delayed) 90 from the respective input voltage. voltage frequency this output is a measurement of the fundamental frequency of the referenced ac voltage source with a range from 0hz to 128hz - lsb . this is a single reading per device . peak voltage this output is a capture of the largest magnitude instantaneous voltage source sample during the previous accumulation interval. vx_peak instantaneous voltage (vx) abs max maximum figure 13. peak voltage m easurement
max78615+lmu data sheet rev 0 26 rms voltage t he max78615 +lmu reports true rms measurements for each input. an rms value is obtained by performing the sum of the squares of instantaneous values over a time interval (accumulation interval) and then performing a square root of the result after dividing by the number of samples in the interval . vx 2 vx 2 _sum vx_rms n instantaneous voltage (vx) n -1 n=0 x figure 14. rms voltage m easurement current channel measurements in addition to instantaneous current measurements updated every sample , peak current, rms current, and crest factor are updated every accum ulation interval (n samples). register description time s cale ia ib instantaneous current 1 sample ia_peak ib_peak peak current 1 interval ia_rms ib_rms rms current ia_crest ib_crest current crest factor peak current this output is a capture of the largest magnitude instantaneous current load sample. ix_peak instantaneous current (ix) abs max maximum figure 15. peak current m easurement
max78615+lmu data sheet rev 0 27 rms current the max78615 +lmu reports true rms measurements for current inputs. the rms current is obtained by performing the sum of the squares of the instantaneous current samples over the accumulation interval and then performing a square root of the result after dividing by the number of samples in the interval . an optional rms offset for the current channels can be adjusted to reduce errors due to noise or system offsets (crosstalk) exhibited at low input amplitudes. full scale values in the i x rms_offs register s are squared and subtracted from the accumulated/divided squares. if the resulting rms value is negative, zero is used. ix 2 ix 2 _sum ix_rms n x instantaneous current (ix) n -1 n=0 - ixrms_off 2 figure 16. rms current m easurement minimum current the device includes a squelch feature to report zero current for no - load conditions . when the rms current value (checked at each accumulation interval) falls below the threshold ( irms_min ) , the device will report zero current and prevent the continued accumulation of energy. register description irms_min if measured ix_rms is less than value in irms_min, then ix_rms is squelched and energy accumulation stops crest factor the crest factor outputs capture the result of the equation ix_crest = i x _peak /ix_rms for the most recent accumulation interva l. they have a range of 0 to 256.
max78615+lmu data sheet rev 0 28 power calculations this section describes the detailed flow of power calculations in the max78615 +lmu . generic equations for ac power measu rement are listed in the table below. register description time s cale pa pb instantaneous active power 1 sample pqa pqb instantaneous reactive power watt_a watt_b watt_c average active power (p) 1 interval var_a var_b var_c average reactive power (q) va_a va_b va_c apparent power (s) pfa pfb pfc power factor note: watt_c, var_c and va_c outputs are always scaled by a factor of 0.5. active power (p) the instantaneous power results (pa, pb) are obtained by multiplying aligned instantaneous voltage and current samples. the sum of these results are then averaged over n samples (accumulation time) to compute the average active power ( watt_ a, watt_ b), and the aggregate average power (watt_ c) . n n -1 n=0 n n -1 n=0 x vb ib + watt_a watt_b watt_c x va ia pa pb pb_offs if |x|< |y| z = 0 x y z pa_offs if |x|< |y| z = 0 x y z pa_sum pb_sum figure 17. active power measurement the value in the p x _off s register is the power offset for the power calculations. full scale values in the p x _offs register are subtracted from the magnitude of the ave raged active power. if the resulting active power value results in a sign change , zero watts are reported .
max78615+lmu data sheet rev 0 29 reactive power (q) instantaneous reactive power results (pqa, pqb) are calculated by multiplying the instantaneous samples of current and the instantaneous quadrature voltage . the sum of these results are then averaged over n samples (accumulation time) to compute the average reactive power (var_a, var_b), and the aggregate average reactive power (var_c) . a reactive power offset (q x _offs) is also provided for each channel . quadrature delay x n -1 n=0 ia va quadrature delay x n -1 n=0 ib vb + var_a var_b var_c pqa pqb vqa vqb q_offs if |x|< |y| z = 0 x y z q_offs if |x|< |y| z = 0 x y z n n pqa_sum pqb_sum figure 18. reactive power measurement apparent power (s) the apparent power, also referred as volt - amps, is the product of low - rate rms voltage and current results . offsets applied to rms current will affect apparent power results. x ia _ rms va _ rms va _ a x ib _ rms vb _ rms va _ b + va _ c figure 19. apparent power measurement power factor ( pf) the power factor registers capture the ratio of active power to apparent power for the most recent accumulation interval . the sign of power factor is determined by the sign of active power. pfx = watt _ x va _ x
max78615+lmu data sheet rev 0 30 fundamental and harmonic calculation s the max78615 +lmu inclu des the ability to separate low - rate voltage, current, active power, and reactive power measurement results into fundamental and total harmonic components . these outputs can also be used to track individual harmonics as well as the total value excluding the selected harmonic. register description time s cale sine cosine instantaneous voltage of the internal waveform generator 1 sample vfund_a vfund_b voltage content at specified harmonic 1 interval ifund_a ifund_b current content at specified harmonic pfund_a pfund_b active power content at specified harmonic qfund_a qfund_b reactive power content at specified harmonic vharm_a vharm_b voltage content not at specified harmonic iharm_a iharm_b current content not at specified harmonic pharm_a pharm_b active power content not at specified harmonic qharm_a qharm_b reactive power content not at specified harmonic the harm register is used to select the single harmonic to extract. this input register is set by default to 0x000001 selecting the first harmonic (also known as the fundamental frequency) . this setting provides the user with fundamental result and the total harmonic distortion (thd) of the harmonics by setting the value in the harm register to a h igher harmonic, the fundamental result registers will contain measurement results of the selected harmonic . likewise, by setting the value in the harm register to a higher harmonic, the harmonics result registers will report the measurement of the remainin g harmonic s . as an example, for any given accumulation interval, the magnitude of measurement result ia_rms would be the sum of ifund_a and iharm_a. the sin e and cosine registers are high - rate registers updated every sample with the instantaneous value of the respective outputs from the internal sine/cosine generator . the referenced ac voltage frequency serves as the reference for the internal waveform generator.
max78615+lmu data sheet rev 0 31 energy calculations energy calculations are included in the max78615 +lmu to minimize the traffic on the host interface and simplify system design . low - rate power measurement result s are multiplied by the number of samples (divisor) to calculate the energy in the last accumulation interval . energy r esults are summed together until a user define d bucket size is reached . when every bucket of energy is reached, the value in the energy counter register is incremented by one . all energy co unter registers are low - rate 24 - bit output registers that contain values calculated over multiple accumulatio n intervals . both import (positive) and export (negative) results are provided for active and reactive energy. register description pa_pos_cnt pb_pos_cnt positive active energy counter pa_neg_cnt pb_neg_cnt negative active energy counter pqa_pos_cnt pqb_pos_cnt positive reactive energy counter pqa_neg_cnt pqb_neg_cnt negative reactive energy counter sa_cnt sb_cnt apparent energy counter energy results are cleared upon any power down or reset and can be manually cleared by the user using the control register . the cycles register can be used to detect device resets (loss of energy data) or to track time between energy reads . a bit in the status register also indicates when a reset has occurred. bucket size for energy counters the bu cket register allows the user to define the unit of measure for the energy counter register s. it is an unsigned 48- bit fixed - point number with 24 bits for the integer part and 24 bits for the fractional part . high word low word bit position 23 22 2 1 0 . 23 22 21 20 1 0 value 2 2 3 2 2 2 2 2 2 1 2 0 2 - 1 2 - 2 2 - 3 2 - 4 2 - 2 3 2 - 2 4 the units should be set large enough to keep the accumulators and counters from overflowing too quickly . to increment the energy counters in watt - hours for example, the value in bucket should be equal to the number of seconds in an hour (3600) multiplied by the sample rate (4000) and divided by full scale watts (v f scale x i f scale). ???? ? ???? ( ? ? ) = 3600 ? ? 4000 ? / ? ??????? ? ??????? full scale watts is d efined by the sensors being used (see the scaling register s section) . as an example, if the voltage sources are 400 volts - peak at full scale (v f scale) and the currents are 30 amps - peak at full scale (i f scale),
max78615+lmu data sheet rev 0 32 then full scale watts would be 12000 watts (v f scale x i f scale). the bucket value can be saved to flash memory as the register default . example in this example the scaling registers are set as follows: vfscale = 667 (667v); ifscale = 50 (50a) in order to set the energy bucket to one wh: ?????? = 3600 ? 4000 667 ? 50 = 431 . 784 the value to enter in the bucket register should be set as: ?????? ???????? = 431 . 784 ? 2 24 the value to set the bucket register is therefore: high word = 0x0001af; low word = 0xc8bb4c
max78615+lmu data sheet rev 0 33 min/max t racking the max78615 +lmu provide s a set of output register s for tracking the minimum and/or maximum values of up to six ( 6 ) different low - rate measurement results over multiple accumulation intervals . the user can select which measurements to track through an address table . mm_addr# uses word addressing for all host interface s . register description time scale mm_addr0 word a ddresses to track minimum and maximum values . a value of zero will disable tracking for that address slot . C mm_addr1 mm_addr2 mm_addr3 mm_addr4 mm_addr5 min0 minimum low - rate value at mm_addr# . multiple intervals min1 min2 min3 min4 min5 max0 maximum low - rate value at mm_addr# . multiple intervals max1 max2 max3 max4 max5 results are stored in ram and cleared upon any power down or reset and can be manually cleared using the control register . a bit in the status register is set whenever a min # or max# register is updated. the address values in mm_addr# can be saved to flash memory by the user as the register defaults. max # max maximum mm _ addr # ram [ # ] min # min minimum control figure 20. min/ max tracking
max78615+lmu data sheet rev 0 3 4 alarm monitoring low - r ate a larm conditions are determined every accumulation interval . if results for die temperature, ac frequency, or rms voltage exceeds or drops below user configurable threshold s , then a respective alarm bit in the status register is set . for rms c urrent and watts r esults, maximum thresholds are provided for detecting overcurrent or overpower conditions with the load. register description t _ max threshold value which temperature must exceed to trigger alarm. t _ min threshold value which temperature must drop below to trigger alarm. f _ max threshold value which frequency must exceed to trigger alarm. f _ min threshold value which frequency must drop below to trigger alarm. v rms_ max threshold value which rms voltage must exceed to trigger alarm. v rms_ min threshold value which rms voltage must drop below to trigger alarm . i rms_ max threshold value which rms current must exceed to trigger alarm. watt_ max threshold value which active power must exceed to trigger alarm. voltage sag and surge detection the max78615 +lmu implements a voltage sag and surge detection function on both va and vb. the sag/surge detection function can generate an alarm when the line voltage drops below or exceeds the relevant programmable threshold s . the firmware calculates on a sam ple - by- sample basis the trailing mean square of the input voltage based on ? line cycle interval according to the following equation : ? ?? = ? ???? 2 ? ?????? ? ? ? 2 0 ? = ? ??? ( ? ?????? 2 ? ???? ) at each sample interval the v ms value is compared to a programmable threshold contained in the v sag and vsurge register s . if v ms falls below or raise s above the relevant threshold s, the firmware sets the relevant bits in the alarms register. the sample count for sag det ection is automatically adjusted by the firmware to maintain coverage over half of the ac line cycle. sag and surge detection is disabled by default and can be enabled by writing a nonzero value to the vsag /vsurge register s . if the vsag /vsurge register s ar e set to 0, the sag /surge feature is disabled. the sag detection can be used to monitor or record the quality of the p ower line or utilize the sag a pin to notify external devices (for example a host microprocessor) of a pending power - down. the external device can then enter a power - down mode (for example saving data or recording the event) before a p ower outage. figure 21 shows a typical sag event.
max78615+lmu data sheet rev 0 35 sag threshold figure 21. measuring voltage s ag register description vsag_val threshold value (in rms) which voltage must go below to trigger a sag alarm. vsurg_val threshold value which voltage must go above to trigger alarm.
max78615+lmu data sheet rev 0 36 status registers the status regist er is used to monitor the status of the device and user configurable alarms . all other registers mentioned in this section share the same bit descriptions. the sticky register determines which alarm/status bits are sticky and which track the current status of the condition . each alarm bit defined as sticky will (once triggered) hold its alarm status until the user clears it using the status_reset register . any sticky bit not set will allow the respective status bit to clear when the condition clears. the status_set and the status_reset registers all ow the user to force s tatus bits on or off respectively without fear of affecting unintended bits. a bit set in the status_set register will set the respective bit in the status register and a bit set in the status_reset register will clear it . status_set and status_reset are both cleared after the status bit is set or reset . the following tabl e lists the bit mapping for all the status related registers. b it name stick - abl e description 23 drdy n o new low - rate results (data) ready 22 mmupd y es min/max update occurred 21 va_ sag y es voltage a sag condition detected 20 vb _ sag y es voltage b sag condition detected 19 sign _v a n o sign of va 18 sign _v b n o sign of vb 17 ov_temp y es temperature over high limit 16 un_temp y es under low temperature limit 15 ov_freq y es frequency over high limit 14 un_freq y es under low frequency limit 13 ov_v rms a y es rms voltage a over limit 12 un_v rms a y es rms voltage a under limit 11 ov_v rms b y es rms voltage b over limit 10 un_v rms b y es rms voltage b under limit 9 va_ surge y es voltage a surge condition detected 8 vb_ surge y es voltage b surge condition detected 7 ov_watt1 y es power 1 over limit 6 ov_watt2 y es power 2 over limit 5 ov_amp1 y es current 1 over limit 4 ov_amp2 y es current 2 over limit 3 xstate n o crystal status 2 relay1 always relay 1 on 1 relay2 always relay 2 on 0 reset always set by device after any type of reset
max78615+lmu data sheet rev 0 37 digital io functionality the dio_ state register contains the current status of the dio s . the user can use this register to read the state of a dio ( if configured as an input ) or control the state of the dio ( if configured as an output) . the dio_ dir register sets the direction of the pins, where 1 is input and 0 is output . if a dio defined as an input is unconnected, internal p ullups will assert the respective dio bit in the dio_state register . note: some pins are used as serial interface pins and may not be capable of user control . during reset, all dios are configured as inputs. dio bit spi uart i 2 c mask register 0 mp0 ifc1 mask0 1 spck addr0 C 2 sdi rx sdai C 3 sdo tx sdao C 4 mp4 mask4 5 ssb rs485 dir scl C 6 mp6 addr1 mask6 7 mp7 mask7 8 ifc0 C 9 :23 reserved i nterface configuration pin s ( ifc0 , ifc1) and address pins ( mp6/addr1 , spck/addr0 ) are input pins sampled at the end of a reset to select the serial host interface and set device addresses (for i 2 c and uart modes) . if the ifc0 pin is low , the device will operate in the spi mode . otherwise, the state of ifc1 and the addr# pins determine the operating mo de and device address . the se pin s must remain configured as an input if directly connect ing to gnd/v 3p3 . otherwise, it is recommended to use external pullup or pulldown resistors accordingly. dio polarity dio s configured as outputs are by default active low. the logic 0 state is on. this can be modified using the dio_pol register using the same bit definition as the dio_state register. any corresponding bit set in the dio_pol register will invert the same dio output s o that it becomes active hig h.
max78615+lmu data sheet rev 0 38 multi p urpose (mp) pins the max78615 +lmu provides five mask registers for signaling the status of any status bit to one of five multipurpose (mp) dio pins . these mask registers have the same bit mapping as the status register. the user must first enable the respective mp pin as an output before the dio can be driven to its active state . pin name register description mp0 mask0 a combination of a bit set in both the status register and a mask register causes the assigned mp pin to be activated (default active - low) . mp4 mask4 mp 6 /addr 1 mask6 mp7 mask7 relay control if one of the relay bit s in a mask register is set, only the respective relay status bit in the status register will change the state of the assigned mp pin . two options are provided for controlling the state of the relay status bit: 1. manual control of relay status using the status_set and status_reset registers . 2. autonomous control determined by the state of other bits in the status and mask register . for example, if a mask register has the relay1 and va_surge bits set, a surge alarm on voltage source va would assert the relay1 status bit. the max78615 +lmu includes a programmable delay for driving the mp pins from the mask register when the relay bit is se t . the relay control logic allows setting a delay time (increments of 250 s ) for energizing (setting) and de - energizing (clearing) the relay pin relative to the zero crossing of the referenced voltage source . the time specified in the registers is expresse d in number of high - rate samples . there is a pipeline delay of 1 sample introduced by the timers. registers description rya_ton ryb_ton relay turn - on delay following low - to - high transition of referenced voltage. rya_toff ryb_toff relay turn - off delay following high - to - low transition of referenced voltage. relay command line voltage ton _ delay de - energized energized de - energized toff _ delay figure 22. relay control
max78615+lmu data sheet rev 0 39 command register the command register is located at address 0x00. use this register to perform specific tasks such as saving coefficients and nonvolatile register default s into flash memory. it also allows initiation of integrated calibration routines . value (hex) description 00xxxx normal operation caxxxx calibration commands bdxxxx software reset accxxx flash access commands normal operation the general settings command allows the user to enable functions such as uart auto reporting, relay operations, and line lock mode etc. bit(s) value description 23:16 0x00 general settings command used during normal operation . 5 ll line lock 1 = lock to line cycle; 0 = independent. 4 tc enable die temperature (gain) compensation 1 = enable; 0 = disable ( debug only ) . calibration command the calibration command starts the calibration process for the selected inputs. it is assumed that appropriate input signals are applied. when the calibration process completes, bits 23:16 are cleared along with bits associated with channels that calibrated successfully. ? when calibrating gain, a ny channels that failed will have their corresponding bit left set. if successful, bits are clear ed. ? when calibrating offset, the bit corresponding to the selected channels will always remain set until manually cleared . bit(s) value description 23:16 0xca calibrate command. 15 0 not used (set to 0) 14 s2 calibrate voltage for sensor 2 . 13 s0 calibrate voltage for sensor 0 . 12 s3 calibrate current for sensor 3 . 11 s 1 calibrate current for sensor 1 . 10 t calibrate temperature. 9 o calibrate offset ( = 1) or gain ( = 0) . 8:6 0 not used (set to 0) 5 ll lock sample period to line cycle. 4:0 0 not used (set to 0) note : during calibration, the line - lock bit should be set for best results.
max78615+lmu data sheet rev 0 40 save to flash command use the acc command to save to flash the calibration coefficients and defaults for nonvolatile registers. upon reset or power - on, the values stored in flash will become new system defaults. the following table describes the acc command bits: bit(s) value description 23:12 0xacc access command. 11:8 0x2 2: save defaults to flash memory for nv registers . 5 1 line lock bit. 4 tc enable die temperature (gain) compensation 1 = enable; 0 = disable (debug only). control register a control register is provided for resetting the tracked energy and min/max measurement values and for clearing energy results . control bit description 23:3 reserved for future use 2 clear energy accumulators and frame c ounter 1 clear energy counters 0 reset min/max tracking configuration register the config register allows the user to configure which sensor (slot) inputs are used for vol tage and current measurements. this section summarizes the configuration bits available to the user. the t wo msb s select the reference voltage slot for deriving zero - crossing detection and line frequency. config[23:22] 00 01 10 11 voltage reference s0 s2 s0 - s2 s0+s2 the remaining bits configure which the sensor inputs are used to derive line voltages and load currents. config bits 19:18 17:16 15:14 13:12 11:10 9:8 7:6 5:4 3:2 1:0 multiplier m2 m0 m2 m0 m2 m0 m3 m1 m3 m1 source vc vb va ib ia there are four choices for every m value as shown below. see the functional description for more information. multiplier bits 00 01 10 11 m (multiplier) value - 1 0 1 2
max78615+lmu data sheet rev 0 41 register access all user registers are contained in a 256 - word (24 - bits each) area of the on - chip ram and can be accessed through the uart, spi, or i 2 c interfaces. these registers are byte - addressable via the uart interface and word - addressable via the spi, and i 2 c interfaces . these registers consist of read (output), write (input), and read/write in the case of the command register . writing to reserved registers or to unspecified memory locations could result in device malfunction or unexpected results. data types the input and output registers have different data types, depending on their assignment and functions . the notation used indicates whether the number is signed, unsigned, or bit - mapped and the location of the binary point. int indicat es a 24 - bit integer with a range of 0 to 16777215 typically used for counters or boolean registers with 24 independent bit values. s indicates a signed fixed - point value . . i ndicates a fixed - point number . nn i ndicates the number of bits to the right of the binary point. example: s.21 is a 24 - bit s igned fixed - point number with 21 fraction bits to the right of the binary point and a range of - 4.0 to 4 - 2 - 21 bit position 23 22 21 . 20 19 18 17 2 1 0 bit multiplier s ign bit ( - 2 2 ) 2 1 2 0 2 - 1 2 - 2 2 - 3 2 - 4 2 - 19 2 - 20 2 - 21 max value 0 1 1 1 1 1 1 1 1 1 1 min value 1 0 0 0 0 0 0 0 0 0 0
max78615+lmu data sheet rev 0 42 register locations use word addresses for i 2 c and spi interfaces and byte addresses for the ssi (uart) protocol. nonvolatile (nv) register defaults are indicated with a y . all other registers are initialized as described in the functional description. word addr byte addr register type nv description 0 0 command int y command register (see command register s ection) 1 3 fw date int firmware release date in hex format (0x00ymd d ) 2 6 mask0 int y status bit mask for mp0 pin 3 9 mask4 int y status bit mask for mp4 pin 4 c mask6 int y status bit mask for mp6 pin 5 f mask7 int y status bit mask for mp7 pin 6 12 -- int y reserved 7 15 sticky int y status bits to hold until cleared by host 8 18 samples int y high - rate samples per low rate (default 400) 9 1b calcycs int y number of calibration cycles to average a 1e phasecomp1 s.21 y phase compensation (+/ - 4 samples) for s1 input b 21 phasecomp 3 s.21 y phase compensation (+/ - 4 samples) for s3 input c 24 s1_gain s.21 y input s 1 gain calibration. positive values only d 27 s0_gain s.21 y input s0 gain calibration. positive values only e 2a s3_gain s.21 y input s3 gain calibration. positive values only f 2d s2_gain s.21 y input s2 gain calibration. positive values only 10 30 s1_offs s.23 y input s0 offset calibration 11 33 s0_offs s.23 y input s 1 offset calibration 12 36 s3_offs s.23 y input s3 offset calibration 13 39 s2_offs s.23 y input s 2 offset calibration 14 3c t_gain s.10 y temperature slope calibration 15 3f t_offs 1 s.10 y temperature 1 offset calibration 16 42 hpf_coef_i s.23 y current input hpf coefficient . positive values only 17 45 hpf_coef_v s.23 y voltage input hpf coefficient . positive values only 18 48 vsurg_int int y voltage surge detect interval 19 4b vsag_int int y voltage sag detect interval 1a 4e status int alarm and device status bits 1b 51 status_set int used to set status bits 1c 54 status_reset int used to reset status bits 1d 57 dio_state int state of dio pins 1e 5a cycle int high - rate sample counter 1f 5d frame int 48 bit low - rate sample number C low word 20 60 frame int 48 bit low - rate sample number C high word 21 63 divisor int actual samples in previous low - rate period 22 66 harm int harmonic selector, default: 1 (fundamental) 23 69 devaddr int y high order address bits for i 2 c and uart interfaces 24 6c control int control (see text) 25 6f config int y input source m (gain) selectors and more 26 72 vtarget s .23 y voltage calibration target . positive values only 27 75 vsurg_ val s .23 y voltage surge threshold . positive values only 28 78 vsag_ val s .23 y voltage sag threshold . positive values only
max78615+lmu data sheet rev 0 43 word addr byte addr register type nv description 29 7b v rms_ min s .23 y voltage lower alarm limit . positive values only 2a 7e v rms_ max s .23 y voltage upper alarm limit . positive values only 2b 81 va_rms s .23 rms voltage for va source 2c 84 vb_rms s .23 rms voltage for vb source 2d 87 va_fund s.23 fundamental voltage for va source 2e 8a vb_fund s.23 fundamental voltage for vb source 2f 8d va_harm s.23 harmonic voltage for va source 30 90 vb_harm s.23 harmonic voltage for vb source 31 93 vc_rms s . 23 rms voltage for vc source 32 96 C s.23 reserved output 33 99 va s.23 instantaneous voltage for va source 34 9c vb s.23 instantaneous voltage for vb source 35 9f vqa s.23 instantaneous quadrature voltage for va source 36 a2 vqb s.23 instantaneous quadrature voltage for vb source 37 a5 vc s.23 instantaneous voltage for vc source 38 a8 sine s.23 reference sine 39 ab cosine s.23 reference cosine 3a ae va_peak s.23 peak recorded voltage 3b b1 vb_peak s.23 peak recorded voltage 3c b4 itarget s .23 y current calibration target . positive values only 3d b7 irms_min s .23 y rms current to squelch as zero. positive values only 3e ba ia_rms s .23 rms current for ia source 3f bd ib_rms s .23 rms current for ib source 40 c0 ia_fund s.23 fundamental current for ia source 41 c3 ib_fund s.23 fundamental current for ib source 42 c6 ia_harm s.23 harmonic current for ia source 43 c9 ib_harm s.23 harmonic current for ib source 44 cc ia s.23 instantaneous current for ia source 45 cf ib s.23 instantaneous current for ib source 46 d2 ia_peak s.23 peak recorded voltage 47 d5 ib_peak s.23 peak recorded voltage 48 d8 irms_ max s .23 y over current alarm limit . positive values only 49 db i a rms_offs s .23 y rms current offset for ia . positive values only 4a de i b rms_offs s .23 y rms current offset for ib . positive values only 4b e1 watt_a s.23 active power for source a 4c e4 watt_b s.23 active power for source b 4d e7 watt_c s.2 3 total active power 4e ea va_a s.23 volt - amperes for source a 4f ed va_b s.23 volt - amperes for source b 50 f0 va_c s.23 total volt - amperes 51 f3 var_a s.23 reactive power for source a 52 f6 var_b s.23 reactive power for source b 53 f9 var_c s.23 total reactive power 54 fc p fund _a s.23 fundamental active power for source a 55 ff p fund _b s.23 fundamental active power for source b 56 102 p harm _a s.23 harmonic active power for source a
max78615+lmu data sheet rev 0 44 word addr byte addr register type nv description 57 105 p harm _b s.23 harmonic active power for source b 58 108 q fund _a s.23 fundamental reactive power for source a 59 10b q fund _b s.23 fundamental reactive power for source b 5a 10e q harm _a s.23 harmonic reactive power for source a 5b 111 q harm _b s.23 harmonic reactive power for source b 5c 114 pa s.23 instantaneous active power for source a 5d 117 pb s.23 instantaneous active power for source b 5e 11a pqa s.23 instantaneous reactive power for source a 5f 11d pqb s.23 instantaneous reactive power for source b 60 120 watt_ max s .23 y power alarm limit 61 123 p a _offs s .23 y active power offset for pa . positive values only 62 126 q a _offs s .23 y reactive power offset for pqa . positive values only 63 129 p b _offs s .23 y active power offset for pb. positive values only 64 12c q b _offs s .23 y reactive power offset for pqb . positive values only 65 12f pfa s.22 source a power factor 66 132 pfb s.22 source b power factor 67 135 pfc s.22 total power factor 68 138 tempc1 s.10 chip temperature C channel 1 69 13b tempc 2 s. 10 chip temperature C channel 2 6a 13e t_target s. 10 y temperature calibration target 6b 141 t_min s. 10 y temperature lower alarm limit 6c 144 t_max s. 10 y temperature upper alarm limit 6d 147 freq s.16 line frequency 6e 14a f_min s.16 y line frequency lower alarm limit 6f 14d f_max s.16 y line frequency upper alarm limit 70 150 C int reserved input 71 153 min1 minimum recorded value 1 72 156 min2 minimum recorded value 2 73 159 min3 minimum recorded value 3 74 15c min4 minimum recorded value 4 75 15f min5 minimum recorded value 5 76 162 min6 minimum recorded value 6 77 165 max1 maximum recorded value 1 78 168 max2 maximum recorded value 2 79 16b max3 maximum recorded value 3 7a 16e max4 maximum recorded value 4 7b 171 max5 maximum recorded value 5 7c 174 max6 maximum recorded value 6 7d 177 mm_addr1 int y min/max monitor - word a ddress 1 7e 17a mm_addr2 int y min/max monitor - word a ddress 2 7f 17d mm_addr3 int y min/max monitor - word a ddress 3 80 180 mm_addr4 int y min/max monitor - word a ddress 4 81 183 mm_addr5 int y min/max monitor - word a ddress 5 82 186 mm_addr6 int y min/max monitor - word a ddress 6 83 189 vfscale int y (see scaling register s section) 84 18c ifscale int y (see scaling register s section) 85 18f scratch1 int y extra register for storing user info
max78615+lmu data sheet rev 0 45 word addr byte addr register type nv description 86 192 scratch2 int y extra register for storing user info 87 195 scratch3 int y extra register for storing user info 88 198 scratch4 int y extra register for storing user info 89 19b bucket int y energy bucket size C low word 8a 19e bucket int y energy bucket size C high word 8b 1a1 ia_crest s.16 crest factor for ia (positive values only) 8c 1a4 ib_crest s.16 crest factor for ib (positive values only) 8d 1a7 C int reserved output 8e 1aa C int reserved output 8f 1ad pa_pos_cnt int positive active energy counter 90 1b0 C int reserved output 91 1b3 C int reserved output 92 1b6 pa_neg_cnt int negative active energy counter 93 1b9 C int reserved output 94 1bc C int reserved output 95 1bf pb_pos_cnt int positive active energy counter 96 1c2 C int reserved output 97 1c5 C int reserved output 98 1c8 pb_neg_cnt int negative active energy counter 99 1cb C int reserved output 9a 1ce C int reserved output 9b 1d1 pqa_pos_cnt int leading reactive energy counter 9c 1d4 C int reserved output 9d 1d7 C int reserved output 9e 1da pqa_neg_cnt int lagging reactive energy counter 9f 1dd C int reserved output a0 1e0 C int reserved output a1 1e3 pqb_pos_cnt int leading reactive energy counter a2 1e6 C int reserved output a3 1e9 C int reserved output a4 1ec pqb_neg_cnt int lagging reactive energy counter a5 1ef C int reserved output a6 1f2 C int reserved output a7 1f5 sa_cnt int apparent energy counter a8 1f8 C int reserved output a9 1fb C int reserved output aa 1fe sb_cnt i24 apparent energy counter ab 201 rya_ton i24 y relay #1 turn - on delay ac 204 ryb_ton i24 y relay #2 turn - on delay ad 207 rya_toff int y relay #1 turn - off delay ae 20a ryb_toff int y relay #2 turn - off delay af 20d C int reserved input b0 210 C int reserved input b1 213 baud int y baud rate for uart interface b2 216 dio_pol int y polarity of dio pins . 1 = active high ; 0 = active low b3 219 dio_dir int y direction of dio pins . 1 = input ; 0 = output
max78615+lmu data sheet rev 0 46 word addr byte addr register type nv description b4 -- reserved b5 tempc b6 21c t_offs 2 s.10 y temperature 2 offset calibration b7 -- reserved b8 -- reserved b9 -- reserved ba -- reserved
max78615+lmu data sheet rev 0 47 s erial interfaces all user registers are contained in a 256- word (24 - bit s each ) area of the on - chip ram and can be accesse d through the uart, spi , or i 2 c interfaces. while access to a single byte is possible with some interfaces, i t is highly recommended that the user access words (or multiple words) of data with each transaction. only one interface can be active at a time . the interface selection pins are sampled at the end of a reset sequence to determine the operating mode. the user should allow 10ms from a power - up or reset event to provide the firmware adequate time to sample the state of these pins. during this time the status of these pins must not change. interface mode ifc0 ifc1 spi 0 x (dont care) uart 1 0 i 2 c 1 1 uart interface the device implements a simple serial interface (ssi) protoc ol on the uart interface that features: ? support for s ingle and multipoint communications ? transmit ( direction ) control for an rs- 485 transceiver ? e fficient use of a low bandwidth serial interface ? data integrity checking the default configuration is 38400 baud, 8 - bit, no - parity, 1 stop - bit, no flow control. the value in the baud register determines the baud rate to be used . example: to select a 9600 baud rate, the user writes a decimal 9600 to the baud register . the new rate will not take effect immediately. it must be saved to flash and will take effect at the next r eset. the maximum baud value is 115200. rs - 485 support the ssb/dir /scl pin is used to drive a n rs- 485 transceiver output enable or direction pin. the implemented protocol supports a full - duplex 4 - wire rs - 485 bus . rs-485 bus a b rout ren den din max78615+lmu sdi /rx/sdai sdo /tx/sdao 4.7k a b rs-485 bus ssb /dir/scl figure 23. configuring for rs - 485
max78615+lmu data sheet rev 0 48 device address configuration the ssi protocol utilize s 8 - bit addressing for multipoint communications . the usable ssi id range is 1 to 255 . in multipoint systems with more than 4 targets, the user must con figure device address bits in the devaddr according to the formula ssi id = device address +1 and save the values to flash memory as the default. a change in the device address takes effect following a power - on or reset. during the initialization, the devaddr register value is restored from flash memory and the state of the address pins are acquired. a device address of 'ff' is not supported . devaddr [23:6] bit s are not used and have no effect on the device address. 7 6 5 4 3 2 1 0 devaddr register bit 5:0 mp6/addr1 pin spck /addr0 pin device address ssi id = device address +1 figure 24. device address configuration
max78615+lmu data sheet rev 0 49 ssi protocol description t he ssi protocol is command response system supporting a single master and one or more targets . the host ( master ) sends command s to a selected target that first verifies the integrity of the packet before sending a reply or executing a command . failure to decode a host packet will cause the selected target to send a fail code. if the condition of a received packet is uncertain, no reply is sent . each target must have a unique ssi id. zero is not a valid ssi id for a target device as it is used by the host to de - select all target devices . with both address pins low on the max78615 +lmu , the ssi id defaults to 1 and is the select ed device following a reset . this configuration is intended for s ingle target (point - to - point) systems that d o not require the use of device addressing or selecting targets . in multipoint systems , t he master will typically de - select all target device s b y selecting ssi id #0 . the master must then select the target with a valid ssi id and get an acknowledgement from the slave before set ting the targets register address pointer and performing read or write operations. if no target is selected , no reply is sent . the ssb/dir/scl pin is asserted while the device is selected . the sequence of operation is shown in the following diagram. select target device set register address pointer read / write commands de - select target device figure 25. ssi protocol d escription master packets master p ackets always start with the 1 - byte he ader (0xaa) for synchronization purposes . t he master then sends the b yte count of the entire packet (up to 255 byte packets) followed by the payload (up to 25 2 bytes) and a 1 - byte modulo - 256 check sum of all packet bytes for data integrity check ing . header (0xaa) byte count checksum payload figure 26. master packet s tructure the payload can contain either a single command or multiple commands if the target is already selected . it can also include device address es, register address es , and data. a ll multibyte payloads are sent and received least - significant - byte first .
max78615+lmu data sheet rev 0 50 master packet command summary command parameters description 0 - 7f (invalid) 80 - 9f (not used) a0 clear address a1 [byte - l] set read/write address bits [7:0] a2 [byte - h] set read/write address bits [15:8] a3 [byte - l][byte - h] set read/write address bits [15:0] a4 - af (reserved for larger address targets) b0 - bf (not used) c0 de - select target (target will acknowledge) c1 - ce select target 1 to 14 (target will acknowledge) cf [byte] select target 0 to 255 (target will acknowledge) d0 [data...] write bytes set by remainder of byte count d1 - df [data...] write 1 to 15 bytes e0 [byte] read 0 to 255 bytes e1 C ef read 1 to 15 bytes f0 - ff (not used) users only need to implement commands they actually need or intend to use. for example, only one address command is required : either 0xa1 for systems with 8 address bits or less or 0xa3 for systems with 9 to 16 address b its. likewise, only one write, read, or select target command needs to be implemented. select target is not needed in systems with only one target.
max78615+lmu data sheet rev 0 51 command payload examples device selection payload 0xcf command ssi id register address pointer selection payload 0xa3 command register a ddress (2 bytes) small read command (3 bytes) payload 0xe3 command large read command (30 bytes) payload 0xe0 command 0x1e ( 30 bytes) small write command (3 bytes) payload 0xd3 command 3 bytes of dat a large write command (30 bytes) byte count payload 0x21 (3 4 bytes) 0xd0 command 30 bytes of dat a after each read or write operation, the internal address pointer is incremented to point to the address that followed the target of the previous read or write operation.
max78615+lmu data sheet rev 0 52 slave packets the type of slave packet depends upon the type of command from the master device and the successful execution by the slave device . standard replies include acknowledge and acknowledge with data . acknowledge without data acknowledge with data byte count read data check sum if no data is expected from the slave or there is a fail code, a single byte reply is sent . if a successfully decoded command is expected to reply with data, the slave sends a packet format similar to the master packet where the header is replaced with a reply code and the payload contains the read data. reply code definition 0xaa acknowledg e with data 0xab acknowledge with data (half duplex) 0xad acknowledge without data. 0xb0 negative acknowledge (nack). 0xbc command not implemented. 0xbd checksum failed. 0xbf buffer overflow (or packet too long). - timeout - any condition too difficult to handle with a reply. failure to decode a host packet will cause the selected target to send a fail code (0xb0 C 0xbf) acknowledgement depending on mode of failure. masters wishing to simplify c ould accept any unimplemented fail code as a negative acknowledge . if no target is s elected or the condition of a received packet is uncertain, no reply is sent. timeouts can also occur when data is corrupt or no target is selected. the master should implement the appropriate timeout control logic after approximately 50 byte times at the current baud rate . when a first reply byte is received, the master should check to see if it is an ssi header or an acknowledge. if so, the timeout timer is reset, and each subsequent receive byte will also reset the timer. if no byte is recei ved within th e timeout interval, the master can expect the slave timed out and re - send a new command.
max78615+lmu data sheet rev 0 53 spi interface the max78615 +lmu spi can be configured as slave only. once the spi interface is activated, it utilizes the following pins: ssb: slave select (ss) is an input and active low signal sck: serial data clock (sck) input sdo: master input/slave output (miso), serial data output sdi: master output/slave input (mosi), serial data input clock polarity and phase the figure below shows a single - byte transaction on the spi bus . the data is shifted on the falling edge of the serial data clock and latched (captured) on the rising edge. sck msb 6 5 4 3 2 1 msb 6 5 4 3 2 1 lsb lsb sdi ( master output) sdo ( master input) ssb (to slave) figure 27. spi clock polarity and phase spi protocol the spi allows access to the max78615 +lmu registers. the first byte that the master needs to tran smit to the max78615 +lmu (slave) is the control byte . the control byte allows setting the number of words to be transferred and the most significant bits of th e register address : bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 n bracc [3:0] addr7 addr6 0 1 addr7 and addr6 bits select bit 7 and 6 of the 8 - bit register address to be accessed by the fo llowing data transactions. the read and write register are contained in a 256 w ords ( 24 - bit) area of the on - chip ram. nbracc[3:0] represents the number of words (3 - bytes) accesses to be performed by subsequent data transactions. the actual number of data addresses accessed per data transaction is nbracc + 1. for single address access, the field is set at 0. nbracc is reset to 0 when the operation (multiple reads or writes) is completed. nbracc must be set to a nonzero value prior to each multiple word tran saction .
max78615+lmu data sheet rev 0 54 the second type of transaction is dedicated to transporting data between the host and the device and is structured as follows: byte number bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 1 addr[5:0] r/w 0 2 data[23:16] @ addr 3 data[15:8] @ addr 4 data[7:0] @ addr 5 data[23:16] @ addr + 1 6 data[15:8] @ addr +1 7 data[7:0] @ addr +1 (nbracc *3) data[7:0] @ addr + nbracc (nbracc*3)+1 data[23:16] @ addr + nbracc ( nbracc*3)+2 data[15:8] + nbracc (nbracc*3)+3 data[7:0] + nbracc r/w: defines the directionality of the transaction (read = 0; write = 1); addr[5:0]: indicates the remainder of the address to access. the following are some transaction examples. example 1: write access of address 0x14. byte number bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 1 nbracc[3:0] = 0x00 addr7 = 0 addr6 = 0 0 1 2 addr[5:0] = 0x14 wr = 1 0 3 data[23:16] @ 0x14 4 data[15:8] @ 0x14 5 data[7:0] @ 0x14 example 2: read access of address 0x17 and 0x18. byte number bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 1 nbracc[3:0] = 0x01 addr7 = 0 addr6 = 0 0 1 2 addr[5:0] = 0x17 rd = 0 0 3 data[23:16] @ 0x17 4 data[15:8] @ 0x17 5 data[7:0] @ 0x17 6 data[23:16] @ 0x18 7 data[15:8] @ 0x18 8 data[7:0] @ 0x18
max78615+lmu data sheet rev 0 55 example 3: non c ontiguous read accesses of address 0x17 and 0x0a. byte# bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 1 nbracc[3:0] = 0x00 addr7 = 0 addr6 = 0 0 1 2 addr[5:0] = 0x17 rd = 0 0 3 data[23:16] @ 0x17 4 data[15:8] @ 0x17 5 data[7:0] @ 0x17 6 nbracc[3:0] = 0x00 addr7 = 0 addr6 = 0 0 1 7 addr[5:0] = 0x0a w = 1 0 8 data[23:16] @ 0x0a 9 data[15:8] @ 0x0a 10 data[7:0] @ 0x0a the timing of the transaction can be organized in different ways depending on the host capabilities. the above transaction can be a succession of bytes as shown in the diagram below. those bytes are carried by a continuously active sck, with eight clock periods per byte. byte 2: addr & ctrl byte 4: data[15:8] byte 5: data[7: 0] sdi byte 3: data[23:16] byte 1: control sck active sck sdo ssb hiz figure 28. spi transfer example the host also has the possibility to space out the bytes transmitted. in such a case, sck is inactive during the in - between - bytes gap, as illustrated below. note that the figure shows two gaps, one between the configuration and the data transactions and another between bytes within the data transaction. the placement of those gaps is strictly for the purpose of illustrating the concept. byte 2 : addr & ctrl byte 4 : data [ 15 : 8 ] byte 5 : data [ 7 : 0 ] sdi byte 3 : data [ 23 : 16 ] byte 1 : control sck active sck sdo ssb hiz sck active sck active figure 29. spi transaction example
max78615+lmu data sheet rev 0 56 i 2 c interface the max78615 +lmu has an i 2 c interface available at the sdai, sdao, and scl pins. the interface supports i 2 c slave mode with a 7 - bit address and operates at a data rate up to 400khz. the figure below shows two possible configurations. configuration a is the standard configuration. the double pin for sda also allows for isolated configuration b. v cc or 5 vdc sdai sdao 5 vdc i 2 c _ gnd sck sdai sdao sck a ) standard configuration b ) isolated configuration 5 vdc sda sck sda sck v cc or 5 vdc v cc or 5 vdc figure 30. connecting the i 2 c i nterface
max78615+lmu data sheet rev 0 57 device address configuration by default, there are only four possible addresses for the max78615 +lmu as defined by two external address pins . to expand the potential address of the device to t he entire 7 - bit address range for i 2 c, one can set i 2 c address b its 6 through 2 in the devaddr register and save them to flash memory as the default . a change in the device address takes effect following a power - on or reset. during the in itialization, the devaddr register value is restored from flash memory and the state of the address pins are acquired. devaddr bits 23 through 5 are not used and have no effect on the device address . 6 5 4 3 2 1 0 devaddr register bit 4:0 spck /addr0 pin mp6/addr1 pin i 2 c device address figure 31. i 2 c device address configuration
max78615+lmu data sheet rev 0 58 bus characteristics ? a d ata transfer may be initiated only when the bus is not busy. ? during data transfer, the data line must remain stable whenever the clock line is high. changes in the data line while the clock line is high will be interpreted as a start or stop condition. bus conditions: ? bus n ot busy (i): both data and clock lines are high indicating an idle condition . ? start data transfer (s): a high to low transition of the sda line while the clock (scl) is high determines a start condition. all commands must be preceded by a start condition. ? stop data transfer (p): a low to high transition of the sda line while the clock (scl) is high determines a stop condition. all operations must be en ded with a stop condition. ? data valid: the state of the data line represents valid data when, after a start condition, the data line is stable for the duration of the high period of the clock signal. the data on the line must be changed during the low period of the clock signal. there is one c lock pulse per bit of data. each data transfer is initiated with a start condition and terminated with a stop condition. ? acknowledge (a): each receiving device, when addressed, is obliged to generate an acknowledge after the reception of each byte. the mas ter device must generate an extra clock pulse, which is associated with this acknowledge bit. the device that acknowledges has to pull down the sda line during the acknowledge clock pulse in such a way that the sda line is stable low during the high period of the acknowledge - related clock pulse. of course, setup and hold times must be taken into account. during reads, a master must signal an end of data to the slave by not generating an acknowledge bit on the last byte that has been clocked out of the slave . in this case, the slave ( max78615 +lmu ) will leave the data line high to enable the master to generate the stop condition. 1 2 7 8 9 ack msb start bit start or stop bits scl may be held low by slave to service interrupts scl sda 9 ack figure 32. i 2 c fundamental bus characteristics device addressing a control byte is the first byte received following the start condition from the master device. the control byte consists of a seven bit address and a bit (lsb) indicating the type of access (0 = write; 1 = read). s x x x r / w x x x x ack start bit device address lsb msb read / write acknowledge figure 33. i 2 c device addressing
max78615+lmu data sheet rev 0 59 write operations following the start (s) condition from the master, the device address (7 bits) and the r/ w bit (logic - low for write) are clocked onto the bus by the master . this indicates to the addresse d slave receiver that the register address will follow after it has generated an acknowledge bit (a) during the ninth clock cycle . therefore, the next byte transmitted by the master is the register address and will be written into the address pointer of th e max78615 +lmu . after receiving another acknowledge (a) signal from the max78615 +lmu , the master device will transmit the data byte(s) to be written into the addressed memory location . the data transfer end s when the master generates a stop (p) condition. this initiates the internal write cycle . the example below shows a 3 - byte data write (24 - bit register write). s device address 6 5 4 3 2 1 0 0 s t a r t a c k register address 5 4 3 2 1 0 6 7 a c k data 1 2 3 4 5 6 7 a c k 0 p s t o p data 1 2 3 4 5 6 7 0 data 1 2 3 4 5 6 7 0 a c k a c k figure 34. i 2 c write operation upon receiving a stop (p) condition, the internal register address pointer will be incremented . the write access can be extended to multiple sequential registers. the figure below shows a single transaction with multiple register s written sequentially. s device address 6 5 4 3 2 1 0 0 s t a r t a c k register address (n) 5 4 3 2 1 0 6 7 a c k data 1 2 3 4 5 6 7 a c k 0 p data 1 2 3 4 5 6 7 0 data 1 2 3 4 5 6 7 0 a c k a c k register (n) 2 3 4 1 0 register (n+1) 6 7 a c k 2 3 4 1 0 6 7 a c k register (n+2) register (n+x) figure 35. i 2 c multiple write operation
max78615+lmu data sheet rev 0 60 read operations read operations are initiated in the same way as write operations with the exception that the r/ w bit of the control byte is set to one . there are two basic types of read operations: current address read and random read. current address read: the max78615 +lmu contains an address counter that maintains the address of the last register accessed, internally incremented by one when the stop bi t is received . therefore, if the previous read access was to register address n, the next current address read operation would access data from address n + 1. upon receipt of the control byte with r/ w bit set to one, the max78615 +lmu issues an acknowledge (a) and transmits the eight bit data byte . the master will not acknowledge the transfer , but generates a stop condition to end the transfer and the max78615 +lmu will discontinue the transmission. s device address 6 5 4 3 2 1 0 1 s t a r t a c k data 1 2 3 4 5 6 7 a c k 0 p s t o p data 1 2 3 4 5 6 7 0 data 1 2 3 4 5 6 7 0 a c k n o a c k figure 36. i 2 c read operation this read operation is not limited to 3 bytes but can be extended until the register address pointer reaches its maximum value . if the register address pointer has not been set by previous operations, it is necessary to set it issuing a command as follows: s device address 0 1 2 3 4 5 6 0 s t a r t a c k register address (n) 2 3 4 5 6 7 s 1 0 a c k p s t o p figure 37. setting the register address pointer random read: random read operations allow the master to access any register in a random manner. to perform this operation, the register address must be set as part of the write operation. after the address is sent, the master generates a start condition following the acknowledge response. this sequence completes the write operation. the master should issue the control byte ag ain this time, with the r/ w bit set to 1 to indicate a read operation. the max78615 +lmu will issue the acknowledge response, and transmit the data . at the end of the transaction the master will not acknowledge the transfer and generate a stop condition. s device address 0 1 2 3 4 5 6 0 s t a r t a c k register address (n) 2 3 4 5 6 7 s 1 0 a c k s r device address 0 1 2 3 4 5 6 1 s t a r t a c k data 5 4 3 2 1 0 6 7 s n o a c k data 1 2 3 4 5 6 7 a c k 0 data 1 2 3 4 5 6 7 0 a c k figure 38. i 2 c multiple read o peration this read operation is not limited to 3 bytes but can be extended until the register address pointer reaches its maximum value.
max78615+lmu data sheet rev 0 61 ordering information part temp range pin - package top mark max78615+lmu/a01 - 40 c to +85 c 24 t qfn iemp max78615+lmu/a01t - 40 c to +85 c 24 t qfn iemp + denotes a lead(pb) - free/rohs - compliant package. t = tape and reel. contact information for more information about the max78615 +lmu or other maxim integrated products , go to: www.maximintegrated.com/support .
max78615+lmu data sheet maxim integrated cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a maxim inte grated product. no circuit patent licenses are implied. maxim integrated reserves the right to change the circuitry and specificati ons without notice at any time. the parametric values (min and max limits) shown in the electrical characteristics table are guaranteed. other parametric values quoted in t his data sheet are provided for guidance. maxim integrated 160 rio robles, san jose, ca 95134 usa 1 -408- 601 - 1000 62 ? 2012 maxim integrated products, inc. maxim integrated and the maxim integrated logo are trademarks of maxim integrated products, inc. revision history revision number revision date description pages changed 0 12/12 initial release ?


▲Up To Search▲   

 
Price & Availability of MAX78615LMUA01

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X